<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
     var i =0;
	setInterval(function myfun(){
	i++;
	d1.innerHTML += "<div>"+i+"</div>";
	},1000);
</script>
</head>
<body>
<div id="d1"></div>
</body>
</html>